<?php

namespace App\Modules\MessageHandler\Handlers;

use App\Modules\Scrappy\Models\CustomerService;
use App\Modules\User\Models\User;
use EasyWeChat\Kernel\Messages\Image;
use EasyWeChat\Kernel\Messages\Text;
use Log;
use EasyWeChat;

class TextHandler
{
    public static function handle($message, ?User $user)
    {
//        EasyWeChat::miniProgram()->customer_service->message(new EasyWeChat\Kernel\Messages\Text("联系客服请长按二维码图片，添加客服微信号。"))->to($message['FromUserName'])->send();
        switch ($message['Content']) {
            case 1:
                return new Text(env('APP_URL')."/#/package/detail");
//                return new Image('');
            case 2:
                return new Text(env('APP_URL')."/#/package/order_list");
        }
    }
}
